@import './variable.less';

html {
  height: 100%;
  box-sizing: border-box;
}

ul,
li {
  list-style: none none outside;
}

table,
td,
th {
  border-collapse: collapse;
}

*,
*:before,
*:after {
  box-sizing: inherit;
  padding: 0;
  margin: 0;
}

*:focus,
*:active {
  outline: none;
}

a:focus,
a:active {
  outline: none;
}

a,
a:focus,
a:hover {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

input[type="number"] {
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

button {
  cursor: pointer;
}

body {
  height: 100vh;
  width: 100vw;
  font-size: var(--dyt-font-size);
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: Avenir, Helvetica, Arial, sans-serif;
  &.again-login-body{
    #app {
      filter: blur(3px);
    }
    .again-login-content{
      padding: 0;
      margin: 0;
      width: auto;
      max-width: 100%;
      border: none;
      .el-message-box__header{
        display: none;
      }
      .el-message-box__content{
        padding: 0;
        margin: 0;
      }
    }
  }
  #driver-popover-item{
    &.step-popover-class{
      max-width: 600px;
    }
  }
  #app {
    height: 100%;
    width: 100%;
    min-width: var(--page-min-width);
    color: var(--dyt-font-corlor);
    overflow: auto;
  }
  // el 按钮设置
  .el-button{
    &:not(.is-circle){
      padding: 8px 10px;
    }
  }
  .el-button,
  .el-link{
    .el-icon{
      vertical-align: text-bottom;
    }
  }
  // el 滚动条设置
  .el-scrollbar__bar{
    &.is-vertical{
      width: 8px;
    }
    &.is-horizontal{
      height: 8px;
    }
    .el-scrollbar__thumb{
      background-color: #303030;
    }
  }
  .el-pagination{
    justify-content: flex-end;
  }
  // 信息提示层级提升
  .el-message{
    z-index: 99999999999 !important;
    .el-message__content{
      line-height: 1.6em;
    }
  }
  .el-input--small {
    font-size: var(--dyt-font-size);
  }

  .mian-container-table{
    td {
      .el-button{
        padding: 4px 5px;
        font-size: 12px;
        &+.el-button{
          padding: 4px 5px;
          margin-left: 5px;
        }
      }
      .el-dropdown{
        .el-tooltip__trigger{
          .el-button{
            height: 24px;
          }
        }
      }
    }
  }
  // 文本省略号
  .text-ellipsis {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  // 文本居中
  .text-center {
    text-align: center
  }
  // 文本不换行
  .text-nowarp {
    white-space: nowrap
  }
  .again-login-message{
    &.el-message-box{
      width: auto;
      padding: 0;
      border: none;
      .el-message-box__content{
        padding: 0px;
      }
      .el-message-box__btns,
      .el-message-box__header{
        display: none;
      }
      .el-message-box__message{
        p{
          line-height: 0;
        }
      }
    }
  }
    
  .el-input--medium{
    .el-input__inner{
      height: 32px;
      line-height: 32px;
    }
  }
  .table-loading{
    .el-loading-mask{
      background-color: #fff;
      .el-loading-spinner{
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100%;
        max-width: 400px;
        height: calc(100% - 100px);
        background-image: url('../images/table_loding.gif');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center center;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        transform: translate(-50%, -50%);
      }
      .circular{
        display: none;
      }
    }
  }
  .first-loading{
    .dyt-table-container{
      .el-table__empty-text {
        background-image: url('../images/search.png');
      }
    }
  }
  .dyt-table-view{
    &.dyt-table-empty{
      .el-table__body-wrapper{
        .el-scrollbar__view{
          height: 100%;
        }
      }
    }
  }
  .dyt-table-container{
    .el-table__body-wrapper{
      position: static;
      min-height: 200px;
    }
    .el-table__empty-text {
      background-image: url('../images/nullength.png');
      display: block;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 100%;
      max-width: 400px;
      height: calc(100% - 100px);
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center center;
      color: rgba(#000, 0);
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
    }
  }
  .vue-treeselect__portal-target{
    z-index: 9999999999 !important;
  }
  .el-popconfirm__action{
    margin-top: 15px;
  }
  .el-input.is-disabled{
    .el-input__inner {
      cursor: no-drop;
    }
  }
  // 表单样式
  .el-form-item{
    margin-bottom: 18px;
    &.is-success{
      .el-input__inner,
      .el-textarea__inner{
        border-color: #DCDFE6;
      }
      .el-input__inner:focus,
      .el-textarea__inner:focus{
        border-color: #409EFF;
      }
    }
    .el-form-item__label,
    .el-form-item__content{
      line-height: 32px;
    }
    .el-form-item__error{
      padding-top: 2px;
    }
    // 自定义表单组件验证失败边框颜色设置
    &.is-error{
      .dyt-tree-content{
        border-color: var(--el-color-danger);
      }
      .vue-treeselect__control,
      .dyt-input-tag-content{
        border-color: var(--el-color-danger);
        .el-input__inner,
        .el-input__wrapper{
          box-shadow: none;
        }
      }
      .dyt-date-picker-demo{
        &.el-range-editor{
          &.el-input__inner{
            box-shadow: 0 0 0 1px var(--el-color-danger) inset;
          }
        }
      }
    }
  }
  // loading 旋转
  .icon-loading{
    display: inline-block;
    animation:iconLoading 1.2s linear infinite;
  }
  // svg 图标设置
  svg.icon, svg.svg-icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    fill: currentColor;
    overflow: hidden;
  }
  // tip 提示
  .popper-limit-tips{
    .popper-tips-content{
      max-width: 500px;
      max-height: 50vh;
      overflow: auto;
    }
    .limit-tips-item{
      display: inline-block;
      margin: 5px;
      padding: 0 8px;
      font-size: var(--dyt-font-size);
      color: #909399;
      background: #f4f4f5;
      border-radius: 5px;
    }
  }
  .el-loading-parent--relative{
    pointer-events:initial;
    -webkit-user-select: initial;
    -moz-user-select: initial;
    -ms-user-select: initial;
    user-select: initial;
  }
  .ml5{
    margin-left: 5px;
  }
  .ml10{
    margin-left: 10px;
  }
  .ml15{
    margin-left: 15px;
  }
  .ml20{
    margin-left: 20px;
  }
  .ml25{
    margin-left: 25px;
  }
  .ml30{
    margin-left: 30px;
  }
  .mt5{
    margin-top: 5px;
  }
  .mt10{
    margin-top: 10px;
  }
  .mt15{
    margin-top: 15px;
  }
  .mt20{
    margin-top: 20px;
  }
  .mt25{
    margin-top: 20px;
  }
  .mt30{
    margin-top: 30px;
  }
  .mr5{
    margin-right: 5px;
  }
  .mr10{
    margin-right: 10px;
  }
  .mr15{
    margin-right: 15px;
  }
  .mr20{
    margin-right: 20px;
  }
  .mr25{
    margin-right: 25px;
  }
  .mr30{
    margin-right: 30px;
  }
  .mb5{
    margin-bottom: 5px;
  }
  .mb10{
    margin-bottom: 10px;
  }
  .mb15{
    margin-bottom: 15px;
  }
  .mb20{
    margin-bottom: 20px;
  }
  .mb25{
    margin-bottom: 25px;
  }
  .mb30{
    margin-bottom: 30px;
  }
}

@keyframes iconLoading {
	0% {transform: rotate(0deg);}
	100% {transform: rotate(360deg);}
}

